#include <iostream>
#include <cstdio>
#include <cstring>
#include <vector>
#include <cmath>
#include <map>
#include <unordered_map>
#include <algorithm>
using namespace std;

class Solution{
public:

	const int P = 10007;
	int gcd(int a, int b) {
		if(b) while((a %= b) && (b %= a));
		return a + b;
	}	

	int maxPoints(vector<vector<int>>& points) {
		int ans = 0, n = points.size();
		if (n < 2) return 1;
	 	for (auto u : points) {
			int x, y;
			unordered_map<int, int> hash;
			for (auto v : points) {
				if (u[0] == v[0] && u[1] == v[1]) continue;
				else if (u[0] == v[0]) x = 0, y = 1;
				else if (u[1] == v[1]) x = 1, y = 0;
				else {
					x = u[0] - v[0], y = u[1] - v[1];
					if (y < 0) x = -x, y = -y;	
					int gcd_num = gcd(abs(x), abs(y));
					x /= gcd_num, y /= gcd_num;
				}
				hash[y + x * P] ++;
			}

			for (auto& [_, num] : hash) {
				ans = max(ans, num + 1);
			}

			if (ans > n / 2) break;
		}	
		return ans;
	}
};

int main() {
	vector<vector<int>> vec = {{0, 0}, {1, -1}, {1, 1}};
	Solution sol;
	cout << sol.maxPoints(vec) << endl;
}
